#include"process.h"
#define STYLE '#'

void process(double cur,double total){
	double rate=cur/total*100;//完成率
	
	const int num=(int)rate;
	char arr[num];//进度条
	
	memset(arr,0,sizeof(arr));
	char move[4]={'-','\\','|','/'};
	for(int i=0;i<=(int)rate;i++)
	{
		arr[i]=STYLE;
	}

	static int count=0;
	count++;//调用次数
	
	printf("[%-100s][%0.2f%%][%c]\r",arr,rate,move[count%4]);
	fflush(stdout);
}
